import request from "@/utils/request";
import { parseStrEmpty } from "@/utils/ruoyi";

// 预警配置新增、修改
export function addOrEdit(data) {
  return request({
    url: "/config/productWarn/v1.0.0/addOrEdit",
    method: "post",
    data: data,
  });
}

// 预警配置查询
export function queryWarnConfig(id) {
  return request({
    url: "/config/productWarn/v1.0.0/queryWarnConfig",
    method: "get",
    params: {
      id: parseStrEmpty(id),
    },
  });
}

// 预警记录分页查询
export function queryProductWarnLogByPage(data) {
  return request({
    url: "/config/productWarn/v1.0.0/queryProductWarnLogByPage",
    method: "post",
    data: data,
  });
}
